<template>
  <img :alt="alt" :src="src" :[woh]="figure" :class="box" :id="'img-attr'" @click="changeAttr" :title="title">
</template>

<script>
import coding from "../assets/coding.jpg";

export default {
  name: 'App',
  data() {
    return {
      alt: 'vue logo',
      src: coding,
      figure: 300,
      box: 'box',
      woh: 'width',
      title: '桃李不言下自成蹊',
    }
  },
  methods: {
    changeAttr() {
      this.woh = this.woh == 'width' ? 'height' : 'width'
    }
  }
}
</script>

<style>
.box {
  border-radius: 30%;
}

#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
